<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.alibaba.druid.util.StringUtils" %>
<%@ page import="com.timeDeal.bean.PinglunBean" %>
<%@ page import="com.timeDeal.bean.XuqiufabuBean" %>
<%@ page import="com.timeDeal.bean.ShijianchushouBean" %>
<%--
  Created by IntelliJ IDEA.
  User: 叼爸爸
  Date: 2016/9/1
  Time: 9:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
      List<PinglunBean>  pb=(List<PinglunBean>)request.getAttribute("pinglun");
     List<String>  name=(List<String>)request.getAttribute("name");
      ShijianchushouBean shijianchushouBean=(ShijianchushouBean)request.getAttribute("shijian");
      String  tijiaoren=(String )request.getAttribute("tijiaoren");
      int max = Integer.valueOf((String )request.getAttribute("MAX"))/6;
      String currentpage =(String )request.getAttribute("currentpage");
      String id =(String )request.getAttribute("id");

%>
<%@include file="../../inc/top.jsp"%>

<form style="marggin-right:200px" name="pingluntijiao" id="pingluntijiao" action="<%=ctxpath%>/user/pingluntijiao.jsp?currentpage=<%=currentpage%>" method="post" >
    <div class="form-group">
        <div style="marggin-right:200px">
            <div class="szl1" style="marggin-right:200px">
                <div class="szl2"><a href="<%=ctxpath%>/user/bierenxinxi.jsp?id=<%=shijianchushouBean.getJiafangid()  %>"><%=tijiaoren%></a>
                    <img src="<%=ctxpath%>/img/girl.jpg" />
                </div>
                <a href="<%=ctxpath%>/user/shijianchushou/shijiandetailgg?id=<%=shijianchushouBean.getShijianchushouid()%>"><%=shijianchushouBean.getShijianchushoumingcheng()%></a>
                <h3 ><%=shijianchushouBean.getBeizhu()%></h3>
                <%if(loginuser==null){}else if(shijianchushouBean.getJiafangid()==loginuser.getYonghuid()){}else{if(StringUtils.equals(shijianchushouBean.getYunxujingbiao(),"是")){ %>
                <a href="<%=ctxpath%>/user/jingbiao.jsp?id=<%=id%>">参与竞标</a>
                <% }else{ %>
                  <a href="<%=ctxpath%>/user/tijiaojiaoyi.jsp?id=<%=id%>">提出申请</a>
                <%}}%>
            </div>
        </div>
        <div style="marggin-right:200px">
           <% for(int i=0;i<pb.size();i++){%>
            <div class="szl1" style="marggin-right:200px">
                <div class="szl2"><a href="<%=ctxpath%>/user/bierenxinxi.jsp?id=<%=pb.get(i).getPinglunrenid()%>"><%=name.get(i)%></a>
                    <br>
                    <img src="<%=ctxpath%>/img/girl.jpg" />
                </div>
                 <h3  ><%=pb.get(i).getPinglunneirong()%></h3>
            </div>
            <%}%>
        </div>
        <div align="center">
             <%
                 for (int i = 0; i <max ; i++) { %>
                    <label><a href="pingluna.jsp?currentpage=<%=i+1%>&leixing=shijianchushou&id=<%=id%>"><%=i+1%></a></label>
                <% }%>
            <br>
            <br>
            <br>
        </div>
        <%if(loginuser==null){ %>
             请先   <a href="<%=ctxpath%>/user/login.jsp">登录</a>
                    <a href="<%=ctxpath%>/user/reg.jsp">注册</a>
        <%} else { %>
        <div>
            <label>
                <h4>我要评论(<font color="#ff0000">140字之内</font>)</h4>
            </label>
            <textarea  rows="5" class="form-control" type="text" name="wodepinglun" id="wodepinglun"  ></textarea>
        </div>
      <%  }%>

        <div align="center">
            <button class="btn btn-primary" type="button" name="pinglun" id="pinglun">评论</button>
        </div>
        <input style="display:none"  class="form-control" type="text" name="leixing" id="leixing"  value="shijianchushou"></input>
        <input style="display:none"  class="form-control" type="text" name="id" id="id"  value="<%=id%>"></input>

    </div>
</form>

<%@include file="../../inc/bottom.jsp"%>








